import Route from 'react-router/lib/Route'
import Home from './components/Home'
import { WeaLocaleProvider } from 'ecCom';

import TotalBudget from './components/TotalBudget';
import Implementation from './components/Implementation';
import CostSummary from './components/CostSummary';
import BudgetDetailed from './components/BudgetDetailed';
import Cost from './components/Cost';
import LoanRepayment from './components/LoanRepayment';
import FnaBudgetDept from './components/FnaBudgetDept';
import FnaBudgetRes from './components/FnaBudgetRes';
import FnaExpenseDept from './components/FnaExpenseDept';
import FnaExpenseRes from './components/FnaExpenseRes';
import FnaExpenseCrm from './components/FnaExpenseCrm';
import FnaExpensePro from './components/FnaExpensePro';
import FnaAdvancePayment from './components/FnaAdvancePayment';
import FnaReportPermission from './public/FnaReportPermission';
import FnaInvoiceIdentify from './components/FnaInvoiceIdentify';
import {FnaInvoiceIdentifyStore} from './stores/fnaInvoiceIdentifyStore';


import './style/index';
import stores from './stores/index'
const { getLocaleLabelByCode } = WeaLocaleProvider;
const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'fna');

class Error extends React.Component {
  render() {
    return (
      <WeaErrorPage ecId={`${this && this.props && this.props.ecId || ''}_WeaErrorPage@cn2pjd`} msg="对不起，无法找到该页面！"/>
    )
  }
}


const fnaRoute = (
  <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@vtosze`} name="fna" breadcrumbName="财务" path="fna" onEnter={getLocaleLabel} component={Home}>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@d6o3o2`} name="totalBudget" path="totalBudget" component={TotalBudget}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@l8m7g3`} name="implementation" path="implementation" component={Implementation}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@l46kid`} name="costSummary" path="costSummary" component={CostSummary}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@irvz9y`} name="budgetDetailed" path="budgetDetailed" component={BudgetDetailed}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@2qru5w`} name="cost" path="cost" component={Cost}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@z6d8z0`} name="loanRepayment" path="loanRepayment" component={LoanRepayment}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@k4f0da`} name="fnaBudgetDept" path="fnaBudgetDept" component={FnaBudgetDept}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@3rbgai`} name="fnaBudgetResource" path="fnaBudgetResource" component={FnaBudgetRes}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@sstep0`} name="fnaExpenseDept" path="fnaExpenseDept" component={FnaExpenseDept}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@a0fdqo`} name="fnaExpenseResource" path="fnaExpenseResource" component={FnaExpenseRes}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@v08mrk`} name="FnaExpenseCrm" path="fnaExpenseCrm" component={FnaExpenseCrm}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@hsmtas`} name="fnaExpenseProj" path="fnaExpenseProj" component={FnaExpensePro}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ojcee3`} name="fnaAdvancePayment" path="fnaAdvancePayment" component={FnaAdvancePayment}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@vyfm96`} name="fnaReportPermission" path="fnaReportPermission" component={FnaReportPermission}/>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@lknktm`} name="fnaInvoiceIdentify" path="fnaInvoiceIdentify" component={FnaInvoiceIdentify}/>
  </Route>
)


class FnaInvoiceIdentifyPage extends React.Component {
  constructor(props){
    super(props);
    this.fnaInvoiceIdentifyStore = new FnaInvoiceIdentifyStore();
  }

  componentDidMount() {
      getLocaleLabelByCode('fna')
  }

  render(){
      return <FnaInvoiceIdentify ecId={`${this && this.props && this.props.ecId || ''}_FnaInvoiceIdentify@1wwv98`} {...this.props} {...{fnaInvoiceIdentifyStore:this.fnaInvoiceIdentifyStore}} />
  }
}



module.exports = {
  Route: fnaRoute,
  store: stores,
  com:{
    FnaInvoiceIdentifyPage,
  }
}
